Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#757) Allow Users to Manually Edit the Generated Email in Cold Email Generator App #765

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shreyasparaj
Copy link
Contributor

@shreyasparaj shreyasparaj commented Oct 21, 2024

Allow users to manually edit the generated email

Pull Request for PyVerse 💡

Requesting to submit a pull request to the PyVerse repository.


Issue Title

Allow Users to Manually Edit the Generated Email in Cold Email Generator App

  • I have provided the issue title.

Info about the Related Issue

This pull request aims to enhance the Cold Email Generator app by allowing users to manually edit the generated email and providing multiple options for further actions. These actions include saving the email as a draft, downloading it as a .txt file, and copying it to the clipboard.

  • I have described the aim of the project.

Name

SHREYAS SHRENIK PARAJ PATIL

  • I have provided my name.

GitHub ID

@shreyasparaj

  • I have provided my GitHub ID.

Email ID

[email protected]

  • I have provided my email ID.

Identify Yourself

GSSOC CONTRIBUTOR

  • I have mentioned my participant role.

Closes

Closes: #757

  • I have provided the issue number.

Describe the Add-ons or Changes You've Made

  1. Added a text area for users to edit the generated email content directly.
  2. Implemented a "Save as Draft" feature using the session state.
  3. Added a "Download" button to export the edited email as a .txt file.
  4. Included a "Copy to Clipboard" button for quick access.
  • I have described my changes.

Type of Change

Select the type of change:

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Verified the text area correctly displays the initial generated email.

  • Tested the "Save as Draft" feature by storing the edited email in the session state and retrieving it.

  • Ensured the "Download" button correctly saves the content as a .txt file.

  • Checked the functionality of the "Copy to Clipboard" button for accuracy.

  • I have described my testing process.


Checklist

Please confirm the following:

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Allow users to manually edit the generated email
Copy link

👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly!

Feel free to join our community on Discord to discuss more!

@UTSAVS26 UTSAVS26 added Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. Status: Review Ongoing PR is currently under review and awaiting feedback from reviewers. level1 gssoc-ext hacktoberfest labels Oct 21, 2024
with col3:
if st.button("Copy to Clipboard"):
st.markdown(f"<script>navigator.clipboard.writeText(`{edited_email}`);</script>")
st.success("Email copied to clipboard!")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try adding a few seconds of delay before the message disappears in the event of "Copy to Clipboard". Otherwise looks good. Update this and I will approve the PR. Thank you.

with col2:
if st.button("Download Email"):
# Save the email as a text file for download
st.download_button("Download Email", edited_email, file_name="email.txt", mime="text/plain")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make a few checks, there are some issues when downloading email (no .txt file is saved) but the code is fine no improvement required.

@ruhi47 ruhi47 added the Status: Requested Changes Indicates that a reviewer has requested changes to a PR before it can be approved. label Oct 24, 2024
@shreyasparaj
Copy link
Contributor Author

shreyasparaj commented Oct 24, 2024

@ruhi47 Change request implemented, please review and merge .
2nd commit -- > ([feature to save email as txt file])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. gssoc-ext hacktoberfest level1 Status: Requested Changes Indicates that a reviewer has requested changes to a PR before it can be approved. Status: Review Ongoing PR is currently under review and awaiting feedback from reviewers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🧑‍💻: Enhancement for Cold Email Generator App (Allow users to manually edit the generated email)
3 participants